package com.lxl.redis3.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;

import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@RedisHash(value = "books",timeToLive = 60)
public class Book implements Serializable {
	@Id
	private int id;
	private String name;
	private String category;
	private String author;
	private double price;
}


